<%-- 
    Document   : mediaDetail
    Created on : Jun 4, 2014, 12:24:20 PM
    Author     : Phan Van Duong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DVD Shop Online - Media</title>
    </head>
    <body>
        <c:set var="mediaDetail" value="${requestScope.MEDIADETAIL}"/>
        <c:if test="${not empty mediaDetail}">
            <h1>${mediaDetail.title}</h1>
            <table width="600">
                <tr>
                    <th rowspan="4" scope="col"><img alt="No Image" src="images/${mediaDetail.representImg}" height="300px" width="200px"/></th>
                    <td>Artist</td>
                    <td>${mediaDetail.artist.name}</td>
                    <td>Country</td>
                    <td>${mediaDetail.country.countryName}</td>
                </tr>
                <tr>
                    <td>Actor/Singer</td>
                    <td>${mediaDetail.actor}</td>
                    <td>Price</td>
                    <td>${mediaDetail.price} $</td>
                </tr>
                <tr>
                    <td>Category</td>
                    <td>
                        <c:forEach var="category" items="${mediaDetail.categoryCollection}">
                            ${category.categoryName}
                        </c:forEach>
                    </td>
                    <td>Like</td>
                    <td>${mediaDetail.countLike}</td>
                </tr>
                <tr>
                    <td colspan="2"><a href="">Add to Cart</a></td>
                    <td colspan="2"><a href="">Like</a></td>
                </tr>
                <tr>
                    <td colspan="5">Introduction ${mediaDetail.otherInfo}</td>
                </tr>
            </table>
            <p>Detail DVD</p>
            <table border="1" width="600">
                <c:forEach var="detail" items="${mediaDetail.mediaDetailCollection}">
                    <tr>
                        <td><a href="">${detail.detailName}</a></td>
                        <td>${detail.introduction}</td>
                    </tr>
                </c:forEach>
            </table>
            <p>Comments</p>
            <form action="" method="Post">
                <textarea rows="5"  name="txtComment" cols="70" ></textarea>
                <br/>
                <input type="submit" value="Post"/>
            </form>
        </c:if>
        <c:if test="${empty mediaDetail}">
            <p>
                Not found data
            </p>
        </c:if>


    </body>
</html>
